﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LoginServer
{
    public class PlayerInfo
    {
        public int ID { get; set; }
        public string Email { get; set; }
        public string Password { get; set; }
        public String NickName { get; set; }
        public int IsOnline { get; set; }
        public int Level { get; set; }
        public List<int> Storage = new List<int>();
        public List<int> Deck = new List<int>();
        public List<PlayerInfo> friends { get; set; }

        public int RoomID { get; set; }

        public int TableID { get; set; }
    }
    public class TableInfo
    {
        public int TableID { get; set; }
        public int PlayerID1 { get; set; }
        public int PlayerID2 { get; set; }
        public string NickName1 { get; set; }
        public string NickName2 { get; set; }
        public int Payment { get; set; }
        public int CardID { get; set; }
        public string Comment { get; set; }
        public TableInfo(int tableid, int playerid1, string nickname1)
        {
            TableID = tableid;
            PlayerID1 = playerid1;
            PlayerID2 = -1;
            NickName1 = nickname1;
        }
        public TableInfo(int tableid, int playerid1, int playerid2, int payment, int cardid, string comment)
        {
            TableID = tableid;
            PlayerID1 = playerid1;
            PlayerID2 = playerid2;
            Payment = payment;
            CardID = cardid;
            Comment = comment;
        }
        public override string ToString()
        {
            return String.Format("{0}|{1}|{2}|{3}|{4}|{5}", TableID, NickName1, NickName2, Payment, CardID, Comment);
        }
    }
    public class RoomInfo
    {
        public int RoomID { get; set; }
        public int ServerId { get; set; }
        public string Name { get; set; }
        public int CountUser { get; set; }
        public int CountCreater { get; set; }
        public int Level { get; set; }
        public RoomInfo(int roomid, int serverid, string name, int level)
        {
            RoomID = roomid;
            ServerId = serverid;
            Name = name;
            Level = level;
        }
        public override string ToString()
        {

            return string.Format("{0}|{1}|{2}|{3}|{4}", RoomID, ServerId, Name, Level, CountUser);
        }
    }
    public class CardInfo
    {
        public int ID { get; set; }
        public string Name { get; set; }
        public int Total { get; set; }
    }
    public class ForbiddenInfo
    {
        public int ID { get; set; }
        public int MaxNumber { get; set; }
    }
}
